package com.multi.thread.chapter02.demo08.test02;

public class MyService {
	
	public void testMethod(MyObject object) {
		synchronized (object) {
			try {
				System.out.println("speedPrintString_____getLock time = " + System.currentTimeMillis() 
				+ ", run threadName = " + Thread.currentThread().getName());
				Thread.sleep(5000);
				System.out.println("speedPrintString releaseLock time = " + System.currentTimeMillis() 
				+ ", run threadName = " + Thread.currentThread().getName());
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}

}
